@extends('layouts.default') @section('main')
<link rel="stylesheet" href="{{URL::asset('js/')}}/kindeditor-4.1.7/themes/default/default.css" />
<link rel="stylesheet" href="{{URL::asset('js/')}}/kindeditor-4.1.7/plugins/code/prettify.css" />
<script src="{{URL::asset('js/')}}/kindeditor-4.1.7/kindeditor.js" type="text/javascript"></script> 
<script charset="utf-8" src="{{URL::asset('js/')}}/kindeditor-4.1.7/lang/zh_CN.js"></script> 
<script charset="utf-8" src="{{URL::asset('js/')}}/kindeditor-4.1.7/plugins/code/prettify.js"></script>
<script type="text/javascript" src="{{URL::asset('js/')}}/ajaxfileupload.js"></script>
<script type="text/javascript" src="{{URL::asset('js/')}}/common.js"></script>
<script src="{{URL::asset('js/My97DatePicker/')}}/WdatePicker.js"></script> 
<script>
KindEditor.ready(function(K) {

		var editor1 = K.create('#activity_content,#activity_summary,#activity_remark', {
			uploadJson: "{{url('kindedit/upload')}}",
			fileManagerJson: "{{url('kindedit/manager')}}",
			allowFileManager: true,
			afterBlur: function() {
				this.sync();
			},
			items: ['source', '|', 'undo', 'redo', '|', 'cut', 'copy', 'paste', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', 'clearhtml', 'quickformat', 'selectall', 'image', '/', 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'table', 'hr', 'emoticons', 'pagebreak', 'anchor', 'link', 'unlink', '|'],
			readonlyMode : true
		});
		
});
</script>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i
				class="icon-home"></i> 首页</a> <a href="{{url('activity/index')}}"
				class="tip-bottom">活动管理</a> <a href="#" class="current">活动详情</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span9">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i>
						</span>
						<h5>活动详情</h5>
					</div>
					<div class="widget-content nopadding">
						<form action="{{url('activity/update')}}" method="post"
							class="form-horizontal" id="activityForm">
							<div class="control-group">
								<label class="control-label">主办方 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="organizer" value="{{$activity->organizer}}" placeholder="主办方" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">主办方网址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="organizer_url" value="{{$activity->organizer_url}}" placeholder="主办方网址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">协助方 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="assistance" value="{{$activity->assistance}}" placeholder="协助方" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">协助方网址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="assistance_url" value="{{$activity->assistance_url}}" placeholder="协助方网址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">媒体 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="press" value="{{$activity->press}}" placeholder="媒体" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">媒体网址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="press_url" value="{{$activity->press_url}}" placeholder="媒体网址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">热门 :</label>
								<div class="controls">
									<label> <input type="radio" name="hot" disabled="disabled" value="1" <?php if($activity->hot == 1):?>checked="checked"<?php endif;?> /> 是
									</label> <label> <input type="radio" name="hot" disabled="disabled" value="0" <?php if($activity->hot == 0):?>checked="checked"<?php endif;?> /> 否
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">推荐 :</label>
								<div class="controls">
									<label> <input type="radio" name="recommend" disabled="disabled" value="1" <?php if($activity->recommend == 1):?>checked="checked"<?php endif;?> /> 是
									</label> <label> <input type="radio" name="recommend" disabled="disabled" value="0" <?php if($activity->recommend == 0):?>checked="checked"<?php endif;?> /> 否
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">状态 :</label>
								<div class="controls">
									<label> <input type="radio" name="status" value="1" disabled="disabled" <?php if($activity->status == 1):?>checked="checked"<?php endif;?> /> 通过
									</label> <label> <input type="radio" name="status" disabled="disabled" value="0" <?php if($activity->status == 0):?>checked="checked"<?php endif;?> /> 等待
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">浏览量 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="views" value="{{$activity->views}}" placeholder="浏览量" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">来源 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="source" value="{{$activity->source}}" placeholder="来源" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">报名结束时间 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="apply_end_time" value="{{date('Y-m-d H:i:s',$activity->apply_end_time)}}" placeholder="报名结束时间" onfocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">标题 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="subject" value="{{$activity->subject}}" placeholder="标题" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">副标题 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="title" value="{{$activity->title}}" placeholder="副标题" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">费用 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="price" value="{{$activity->price}}" placeholder="费用" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">费用描述 :</label>
								<div class="controls">
									<textarea class="span11" disabled="disabled" name="price_description" >{{$activity->price_description}}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">活动开始时间 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="begin_time" value="{{date('Y-m-d H:i:s',$activity->begin_time)}}" onfocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" placeholder="活动开始时间" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">活动结束日期 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="end_time" value="{{date('Y-m-d H:i:s',$activity->end_time)}}" onfocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" placeholder="活动结束日期" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">内容 :</label>
								<div class="controls">
									<textarea id="activity_content" disabled="disabled" name="content" style="width: 450px; height: 240px;">{{$activity->content}}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">导读 :</label>
								<div class="controls">
									<textarea id="activity_summary" disabled="disabled" name="summary" style="width: 450px; height: 240px;">{{$activity->summary}}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">图片 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="photo" value="{{$activity->photo}}" placeholder="图片" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">备注 :</label>
								<div class="controls">
									<textarea id="activity_remark" disabled="disabled" name="remark" style="width: 450px; height: 240px;">{{$activity->remark}}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">大图 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="bg_img" value="{{$activity->bg_img}}" placeholder="大图" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">海报 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="haibao" value="{{$activity->haibao}}" placeholder="海报" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">联系方式 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="phone" value="{{$activity->phone}}" placeholder="联系方式" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">短信提醒 :</label>
								<div class="controls">
									<label> <input type="radio" name="is_sms_warn" disabled="disabled" value="1" <?php if($activity->is_sms_warn == 1):?>checked="checked"<?php endif;?> /> 是
									</label> <label> <input type="radio" name="is_sms_warn" disabled="disabled" value="0" <?php if($activity->is_sms_warn == 0):?>checked="checked"<?php endif;?> /> 否
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">现场报道地址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="path_url" value="{{$activity->path_url}}" placeholder="现场报道地址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">活动类型 :</label>
								<div class="controls">
									<select name="type" disabled="disabled">
										@foreach($types as $type)
					                  <option value="{{$type['code']}}" <?php if($activity->type == $type['code']):?>selected="selected"<?php endif;?>>{{$type['name']}}</option>
					                  	@endforeach
					                </select>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">整场视频地址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="video_url" value="{{$activity->video_url}}" placeholder="整场视频地址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">app整场视频地址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="app_video_url" value="{{$activity->app_video_url}}" placeholder="app整场视频地址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">专题名称 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="name" value="{{$activity->name}}" placeholder="专题名称" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">期数 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="nper" value="{{$activity->nper}}" placeholder="期数" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">二维码地址(整场视频的详情页） :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="qrcode_video" value="{{$activity->qrcode_video}}" placeholder="二维码地址(整场视频的详情页）" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">二维码地址(活动的详情页） :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="qrcode_detail" value="{{$activity->qrcode_detail}}" placeholder="二维码地址(活动的详情页）" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">视频图片 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="video_photo" value="{{$activity->video_photo}}" placeholder="视频图片" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">直播地址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="live_url" value="{{$activity->live_url}}" placeholder="直播地址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">分享数量 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="share_views" value="{{$activity->share_views}}" placeholder="分享数量" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">点击量 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="click_views" value="{{$activity->click_views}}" placeholder="点击量" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">时长 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="times" value="{{$activity->times}}" placeholder="时长" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">线下费用 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="money" value="{{$activity->money}}" placeholder="线下费用" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">付款方式 :</label>
								<div class="controls">
									<label> <input type="radio" name="pay_type" disabled="disabled" value="0" <?php if($activity->pay_type == 0):?>checked="checked"<?php endif;?> /> 线上
									</label> <label> <input type="radio" name="pay_type" disabled="disabled" value="1" <?php if($activity->pay_type == 1):?>checked="checked"<?php endif;?> /> 线下
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">微信报名活动图片 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="wx_photo" value="{{$activity->wx_photo}}" placeholder="微信报名活动图片" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">是否跨域 :</label>
								<div class="controls">
									<label> <input type="radio" name="cross_domain" disabled="disabled" value="0" <?php if($activity->cross_domain == 0):?>checked="checked"<?php endif;?> /> 不跨域
									</label> <label> <input type="radio" name="cross_domain" disabled="disabled" value="1" <?php if($activity->cross_domain == 1):?>checked="checked"<?php endif;?> /> 跨域
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">活动详细地址 :</label>
								<div class="controls">
									<input type="text" class="span11" disabled="disabled" name="address" value="{{$activity->address}}" placeholder="活动详细地址" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">活动地点 :</label>
								<div class="controls">
									<select name="city_id" id="city" disabled="disabled">
									<option value="0">省份</option>
										@foreach($zoneTree as $zone)
					                  <option value="{{$zone['id']}}" <?php if($activity->city_id == $zone['id']):?>selected="selected"<?php endif;?>>{{$zone['name']}}</option>
					                  	@endforeach
					                </select>
					                <select name="zone_id" id="zone" disabled="disabled">
									<option value="0">城市</option>
										
					                </select>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">是否招集 :</label>
								<div class="controls">
									<label> <input type="radio" name="is_assemble" disabled="disabled" value="0" <?php if($activity->is_assemble == 0):?>checked="checked"<?php endif;?> /> 否
									</label> <label> <input type="radio" name="is_assemble" disabled="disabled" value="1" <?php if($activity->is_assemble == 1):?>checked="checked"<?php endif;?> /> 是
									</label>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">招集结束时间 :</label>
								<div class="controls">
									<input type="text" class="span11" name="assemble_end_time" disabled="disabled" value="{{date('Y-m-d H:i:s',$activity->assemble_end_time)}}" onfocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" placeholder="招集结束时间" />
								</div>
							</div>
                            <div class="control-group">
                                <label class="control-label">联系人 :</label>
                                <div class="controls">
                                    <input type="text" class="span11" name="contact" disabled="disabled" value="{{$activity->contact}}"  placeholder="联系人" />
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">联系人邮箱 :</label>
                                <div class="controls">
                                    <input type="text" class="span11" name="email" disabled="disabled" value="{{$activity->email}}"  placeholder="联系人邮箱" />
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">人数说明 :</label>
                                <div class="controls">
                                    <input type="text" class="span11" name="people_explain" disabled="disabled" value="{{$activity->people_explain}}"  placeholder="人数说明" />
                                </div>
                            </div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
var city_id = {{$activity->city_id}};
var zone_id = {{$activity->zone_id}};
if(city_id > 0){
	$.post("{{url('zone/children')}}", {
		id: city_id
	}, function(data) {
		if (data.status) {
			var html = '<option value="0">城市</option>';
			$.each(data.message, function(i, n) {
				var selected = zone_id == n.id ? 'selected="selected"' : '';
				html += "<option value='"+n.id+"' "+selected+">"+n.name+"</option>";
			});
			$("#zone").html(html);
		}
	}, 'json');
}
$("#city").change(function() {
	$("#zone").empty();
	$.post("{{url('zone/children')}}", {
		id: $(this).val()
	}, function(data) {
		if (data.status) {
			var html = '<option value="0">城市</option>';
			$.each(data.message, function(i, n) {
				html += "<option value='"+n.id+"'>"+n.name+"</option>";
			});
			$("#zone").html(html);
		}
	}, 'json');
});
</script>
@stop
